package com.sh.data.engine.domain.common.model.domain;

import java.util.Arrays;

public class Table extends Position {

    private Label label;

    private Item[] columns;

    private String id;

    public void setLabel(Label label) {
        this.label = label;
    }

    public void setColumns(Item[] columns) {
        this.columns = columns;
    }

    public void setId(String id) {
        this.id = id;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof Table)) {
            return false;
        }
        Table other = (Table) o;
        if (!other.canEqual(this)) {
            return false;
        }
        Object this$label = getLabel(), other$label = other.getLabel();
        if ((this$label == null) ? (other$label != null) : !this$label.equals(other$label)) {
            return false;
        }
        if (!Arrays.deepEquals((Object[]) getColumns(), (Object[]) other.getColumns())) {
            return false;
        }
        Object this$id = getId(), other$id = other.getId();
        return !((this$id == null) ? (other$id != null) : !this$id.equals(other$id));
    }

    protected boolean canEqual(Object other) {
        return other instanceof Table;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        Object $label = getLabel();
        result = result * 59 + (($label == null) ? 43 : $label.hashCode());
        result = result * 59 + Arrays.deepHashCode((Object[]) getColumns());
        Object $id = getId();
        return result * 59 + (($id == null) ? 43 : $id.hashCode());
    }

    public String toString() {
        return "Table(label=" + getLabel() + ", columns=" + Arrays.deepToString((Object[]) getColumns())
            + ", id=" + getId() + ")";
    }

    public Label getLabel() {
        return this.label;
    }

    public Item[] getColumns() {
        return this.columns;
    }

    public String getId() {
        return this.id;
    }
}
